module WsClient

	class ProtocolFactory
		def self.create(url, version)
			protocol = case version
				when 0 then
					WsClient::Ietf00::Protocol
				else
					raise ArgumentError.new("Unsupported protocol version #{version}")
			end
			
			protocol.new(url)
		end
	end

end
